Add auto-barter to trade UI and global toggle to trade agreements#1577
Add auto-barter to trade UI and global toggle to trade agreements#1577sizzlins wants to merge 8 commits intoDFHack:masterfrom
Conversation
sizzlins
commented
Apr 21, 2026
- Adds an 'Auto Barter' feature to the trade window, calculating required values and automatically selecting merchant/fortress goods to match an internal margin factor.
- Adds a global 'Select Globally' toggle hotkey to the diplomacy requests UI to select/deselect requests from all available tabs.
|
The wiki says you should do this with a macro but doesn't provide an example, I tried searching for one but couldn't find. FWIW, I tried AI vibe-coding an edit to |
the script has a builtin cheat sheet that tells it exactly where to find lists of things like leather, meat, and gems in the game's data, however, it doesn't have a cheat sheet for finding stones and boulders, because it doesn't know how to look up the list of available stones, the script simply hides the select by value button whenever you click on the stone tab. i am currently working to add this feature, select by weight |
…o trade agreements - Implements persistent, per-civ trade agreement saving/loading - Adds 'Select by Weight' and 'Select by Value' sorting for Boulders, Metal, Cheese, Crafts, Mugs, Glass, Silk, and almost all other raw materials. - Includes numerous defensive nil-checks for safe memory parsing.
7e740b6 to
1529058
Compare
Most likely yes. will be fixed if fixable |
ee5dccb to
c22d531
Compare
|
implementing the full density * volume / 1,000,000 mass formula would require looking up each items volume from the item definition, which varies by item type. I've renamed the button and dialog from "Select by weight" to "Select by density" with the kg/m³ unit shown in the list, so it's now accurately labeled. The overlay height reduced from h=7 to h=5, if you're still seeing overlap, you can also reposition the overlay with gui/overlay if it clips on your setup Added an emptyresult guard, if the material list resolves to zero entries, you now get a "No density data available for wood" announcement instead of a broken empty dialog "select by weigh", this was a frame width issue , the button labels should now fit within the allocated space. |



